{include file="public/header"/}
{load href="/public/static/Content/ThemesBusiness/FormPage.css"}

<div id="tabState" class="easyui-tabs" fit="true">
    <div title="新建">
        <form id="formState">
            <table class="form_table" style="width:860px">
                <tr class="form_tr">

                    <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                        管理员名称
                    </th>
                    <td style="width:155px;padding-left:8px;" colspan="1" class="form_td form_td_content">
                        <input class="easyui-validatebox" type="text" validtype="workflowStateIsStart" name="name" style="width:150px;"
                               value="{$info.name}" data-options="required:true,tipPosition:'right'," />
                    </td>
                    <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                        排序
                    </th>
                    <td style="width:155px;padding-left:8px;" colspan="1" class="form_td form_td_content">
                        <input class="easyui-numberspinner" min="0" type="text" name="sort" style="width:150px;"
                                value="{$info.sort}" data-options="required:true,tipPosition:'right'," />
                    </td>
                </tr>


                    <!-- 隐藏域 -->
                    {notempty name="$info.id"}
                    <input type="hidden" name="id" value="{$info.id}">
                    {/notempty}
                 
                    <tr class="form_tr">
                        <td class="form_button_panel" colspan="6" style="padding-right:8px">
                        <!--  <span style="color:red;">数量限制设为0时表示不限制数量</span>  -->  <a  id="save" class="easyui-linkbutton form-toolbar-button" data-options="iconCls:'icon-save'">保存</a>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
<script>
   $(function() {
       $("#save").on("click",function(){
                $.ajax({
                       type: 'POST',
                       url: "{:url('admin/usergroup/save')}",
                       data:  $("#formState").serialize(),
                       dataType: "json",
                       async: false,
                    error: function(request) {
                        alert("发送请求失败！");
                    },
                   success: function(data){
                        if (data.status == 1) {          
                                closeRefreshDialog();
                              //closeDialog();
                        } else {
                           // $.messager.alert('提示', data.msg, 'info');
                           // return;
                            alert(data.msg);
                    
                        }
                       
                    } 
                });
       })
    })

   
</script>

{include file="public/footer"/}